#ifndef _VALIDATOR_H_
#define _VALIDATOR_H_

#include "Task.h"
#include<iostream>
#include<fstream>
#include<string>
#include<cctype>
#include<vector>
#include<sstream>
#include<algorithm>
#include<math.h>
#include<ctime>

using namespace std;

class Validator{
private:
        //a temporary vector used for storing temporary information. 
        vector<string> tempVector;
        //a temporary vector used for storing dates that needs to be validated. 
        vector<int> dateVector;

        // attributes will be added as more and more functions are done
public:
        //vector<Task>taskList is a vector of 'Task' instances from the executorclass.
        bool isValidCommand(string &command);
        string toLowerCase(string input);
        bool isValidKeyword(string &keyword);
        bool isValidTask(string taskname, vector<Task*> & taskList);
        bool isValidTaskNumber(int tasknumber, vector<Task*> & taskList);
        bool isInt(string input);
        bool isEmptyString(string sentence);
        bool isEmptyTaskList(vector<Task*> & taskList);
        bool isValidDate(string date);
        bool isLeapYear(string year);
        bool isValidDay(int day, int month, string year);
        bool isValidMonth(int day, int month, string year);
        bool isValidYear(string year);
        bool isValidTaskName(string taskname);
        //This function checks if the task's start time and end time is not past the current time.
        bool isValidTaskTime(string validtime);
        // the next 3 functions help to ensure that the date is in the right format:dd/mm/yyyy
        /*if not the functions will help to do so. eg if the user types in 12. 12 is assumed be the
        day and the functions will add in the CURRENT MONTH and CURRENT YEAR. if the user types in 12/03,
        then the functions will add in the CURRENT YEAR.
        */
        string makeProperDateFormat(string date);
        string addMonthAndYear(string date);
        string addYear(string date); 
		string addStringToString(string originalstring, string addstring);
        int getDay();
        int getMonth();
        string getYear();
		int getCurrentMonth();
		int getCurrentYear();
		int getCurrentHour();
		int getCurrentDay();
        void tokenizeDate(string date);
        void changeStringToInt();




};
#endif
